package com.yunji.cabinet.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yunji.common.annotation.Excel;
import com.yunji.common.base.BaseDO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Max;
import java.io.Serializable;
import java.util.List;

;

/**
 * @version 1.0
 * @Project: yunji-coffee
 * @Package com.yunji.cabinet.domain
 * @FileName CabinetTemplate.java
 * @Copyright Copyright © 2024 云集互联. All Rights Reserved
 * Company		com
 * @CreateTime 2024-04-07 16:38:16
 * @Description 货柜模板信息
 * @Modification Author                    History Time			Version				Description
 * --------------------------------------------------------------------------------
 * HuaAo				2024-04-07 16:38:16		1.0					1.0 Version
 * @since JDK 1.8.0_202
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "template", description = "货柜模板")
@TableName("template")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class CabinetTemplateDO extends BaseDO implements Serializable {
    private static final long serialVersionUID = -5550919116088822405L;

    @ApiModelProperty(value = "模板ID")
    @TableId(type = IdType.AUTO)
    private Long templateId;

    @ApiModelProperty(value = "所属ID")
    private Long belongId;

    @Excel(name = "模板名称")
    @ApiModelProperty(value = "模板名称", required = true)
    @Length(message = "模板名称不能超过{max}个字符", max = 10)
    private String templateName;

    @Excel(name = "用户类型")
    @ApiModelProperty(value = "用户类型")
    private String userType;

    @Excel(name = "用户ID")
    @ApiModelProperty(value = "用户ID")
    private Long userId;

    @Excel(name = "代理ID")
    @ApiModelProperty(value = "代理ID")
    private Long agentId;

    @Excel(name = "网点id")
    @ApiModelProperty(value = "网点id")
    private Long siteId;

    @Excel(name = "货柜类形code")
    @ApiModelProperty(value = "货柜类形code", required = true)
    private String typeCode;

    @Excel(name = "货柜格子数量")
    @ApiModelProperty("货柜格子数量")
    @Max(message = "格子数不能超过{value}", value = 99)
    private Integer nums;

    @Excel(name = "模板状态")
    @ApiModelProperty("模板状态")
    private Integer status;

    @Excel(name = "模板商品信息")
    @ApiModelProperty(value = "模板商品信息", required = true)
    @TableField(exist = false)
    private List<CabinetTemplateCellDO> list;

}
